def isper(n):
    sum=0
    for i in range(1,n):
        if n%i==0:
            sum+=i
    return n==sum
n=int(input("请输入一个值："))
if isper(n):
    print("{}是完数".format(n))
else:
    print("{}不是完数".format(n))
